package com.zhangjie.servicemap.controller;

import com.zhangjie.internalcommon.dto.ResponseResult;
import com.zhangjie.servicemap.service.ServiceFromMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务管理控制器
 * @Auther: zj
 * @Date: 2024/2/29 - 02 - 29 - 10:57
 * @Description: com.zhangjie.servicemap.controller
 * @version: 1.0
 */
@RestController
@RequestMapping("/service")
public class ServiceController {

    @Autowired
    ServiceFromMapService serviceFromMapService;

    /**
     * 创建服务
     * @param name
     * @return
     */
    @PostMapping("/add")
    public ResponseResult add(String name) {

        return serviceFromMapService.add(name);
    }
}
